package org.sportspace.base.domain;

/**
 * 用户公用信息
 */
abstract class UserInfo {

    String id
    String loginName
    String password
    String userEmail
    String cardType
    String cardNumber
    String userName
    String cellphone
    String qq
    String msn
    String birthDate
    String registerDate
    String userStatus='valid'

    Location location

    static constraints = {
        id(size:0..128);
        loginName(size:4..32,unique:true)
        password(size:6..128)
        userEmail(size:0..32,nullable:true)
        cardType(size:0..32,nullable:true)
        cardNumber(size:0..128,nullable:true)
        userName(size:2..128)
        cellphone(size:4..32,nullable:true)
        qq(size:1..32,nullable:true)
        msn(size:1..32,nullable:true)
        birthDate(size:4..32,nullable:true)
        registerDate(size:4..32)
        userStatus(inList:['valid','suspend'])
    }
    static mapping = {
        id columns:'user_id',generator:"uuid"
        tablePerSubclass(true)
    }
}
